-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
[Kernel] Enable fp8 support for pplx and BatchedTritonExperts. #18864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
This pull request has merge conflicts that must be resolved before it can be |
This pull request has merge conflicts that must be resolved before it can be |
This pull request has merge conflicts that must be resolved before it can be |
911339b
to
f92734e
Compare
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Bill Nell <bnell@redhat.com>
LGTM! Really nice cleanups @bnellnm 🙌 |
Thanks! |
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
@pytest.mark.parametrize("dtype", [torch.float8_e4m3fn, torch.bfloat16]) | ||
@pytest.mark.parametrize("per_act_token_quant", [False, True]) | ||
@pytest.mark.parametrize("block_shape", [None, [128, 128]]) | ||
@pytest.mark.parametrize("input_scales", [False]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this only False
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left it here for future testing,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Should there be also a condition in the test code to skip the test if input_scales == True
and quant_dtype is None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's one of the conditions that needs more testing. There's some int8/int4 quantization schemes that happen outside the triton kernels. So they need to pass in the quantized data + scales, but no quant_type since they are already quantized.
@@ -178,6 +175,8 @@ def run_cutlass_moe_fp8( | |||
c2 = _resize_cache(workspace2, (M * topk, N)) | |||
c3 = _resize_cache(workspace13, (M * topk, K)) | |||
|
|||
c1.fill_(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a condition here that we only zero-out c1
if expert_map
is not none and per_act_token == True
? As far as I'm aware, this is the only case when it's needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another PR that has the proper condition for this. I don't want to have to rerun everything at this point. I'll let that other PR push the better fix.
…project#18864) Signed-off-by: Bill Nell <bnell@redhat.com>
…project#18864) Signed-off-by: Bill Nell <bnell@redhat.com>
…project#18864) Signed-off-by: Bill Nell <bnell@redhat.com>
Enable full fp8 support for pplx and BatchedTritonExperts.
num_dispatchers
.--optional
pytest flag.I've verified all the combinations from here work properly: dispatch_combine fp8 support matrix by branch + model.xlsx
with DP=2/TP=1, DP=2/TP=2 and DP=4/TP=1.
lm-eval results for RedHatAI/Llama-4-Scout-17B-16E-Instruct-FP8-dynamic with pplx, DP=4, TP=1.
cc @ElizaWszola